package app.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.stereotype.Component;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Set;

@Entity
@Table(name = "jurisdiction")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
public class Jurisdiction  implements Serializable {
    //标识这个列是主键
    @Id
    //设置主键生成策略
    @GenericGenerator(name = "pk", strategy = "increment")
    //使用主键生成策略
    @GeneratedValue(generator = "pk")
    //列名
    @Column(name = "id")
    private Integer id;
    @Column(name = "name")
    private String name;
}
